class Animal:
    name = 'animal'

class Dog(Animal):
    name = 'dog'  #若无此，则调用上述父类的name属性
    def show(self):
        print('dog~~~~~~~~~~')

dog = Dog()
print(dog.name)